package com.smart.controller;

import com.smart.common.ResultVo;
import com.smart.entity.Feedback;
import com.smart.entity.Toke;
import com.smart.service.FeedbackService;
import com.smart.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api")
public class UserFeedBackController {

    @Resource
    private FeedbackService feedbackService;

    @PostMapping("/user/feedback/add")
    public ResultVo Feedback(Feedback feedback) {
        Integer result = feedbackService.FeedbackAdd(feedback);
        return ResultVo.ok().data("item", result);
    }
}
